xen: credit2: fix 2 (minor) issues in load tracking logic
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 3 May 2016 21:46:50 +0000 (23:46 +0200)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 4 May 2016 16:43:31 +0000 (17:43 +0100)
commitadf7d04317b4c4e60db42314ad874a45d80e65b9
treefee583be2e9c84121b911d0b3a4d32977f3d9e28
parentf45666afdb01615feccde1a166042ce11befe751
xen: credit2: fix 2 (minor) issues in load tracking logic

All calculations that involve load_last_update uses quantities
shifted by LOADAVG_GRANULARITY_SHIFT, so make sure that this
is true even when the field is assigned a value for the first
time, during vcpu allocation.

Also, during migration, while the loads of both the source and
destination runqueues certainly need changing, the vcpu being
moved does not change its running/non-running status, and its
calculated load should hence not be affected.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/common/sched_credit2.c